#!/usr/bin/env node
// console.log('执行');
// console.log(process.argv);
const {readdirSync} = require('fs');
const { existsSync, statSync } = require('node:fs');
console.log(__dirname);
console.log(process.cwd());
const rootpath=process.cwd()

let args = process.argv[2];
let dirpsth = path.join(rootpath,args)
console.log(rootpath,args);
if(existsSync(dirpsth)){
    if(statSync(dirpsth).isFile()){
        console.log('文件');
        console.log();
    }else{
        console.log('是文件夹');
    }
}